/*
 * $Id$
 */
package corejs.rt;

public class Null extends Primitive {
   
   public static final Null NULL = new Null();
   
   private Null() {}
   
   @Override
   public Bool toBool() {return Bool.FALSE;}
   
   // spec 9.3
   @Override
   public Number toNumber() {return Int.ZERO;}
   
   @Override
   public Str toStr() {return Str.NULL;}
   
   @Override
   public boolean equals(final Primitive other) {
      return this == other || other.isUndefined();
   }
   
   private static final Str _typeof_null_ = new Str("object");
   @Override
   public Str typeof() {return _typeof_null_;}
}
